<?php

namespace app\admin\validate;

use think\Validate;

class Shop extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'shop_name'       => 'require',
        'mobile'          => 'require',
        'consignor'       => 'require',
        'details_address' => 'require',
        'area_id'         => 'require',
        'wanwan_id'       => 'require',
        'shop_type'       => 'require',
        'status'          => 'require',
        'shop_cat'        => 'require',
        'shop_url'        => 'require',
        'shop_pic'        => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['shop_name', 'mobile', 'consignor', 'details_address', 'area_id', 'wanwan_id', 'shop_type', 'status', 'shop_cat', 'shop_url', 'shop_pic'],
        'edit' => [],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'shop_name'       => __('Shop_name'),
            'mobile'          => __('Mobile'),
            'consignor'       => __('Consignor'),
            'details_address' => __('Detail_address'),
            'area_id'         => __('Area_id'),
            'wanwan_id'       => __('Wanwan_id'),
            'shop_type'       => __('Shop_type'),
            'shop_cat'        => __('Shop_cat'),
            'shop_url'        => __('Shop_url'),
            'shop_pic'        => __('Shop_cat'),
        ];
        parent::__construct($rules, $message, $field);
    }

}
